﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace myWindowsMediaPlayer.Model
{
    class musicModel : IEquatable<musicModel>
    {
        private artist  artist;
        private album   album;
        private track   track;

        public bool Equals(musicModel other)
        {
            if (other.Album.Equals(this.album) &&
                other.Track.Equals(this.track) &&
                other.Artist.Equals(this.artist))
                return true;
            return false;
        }

        public artist Artist
        {
            get { return this.artist; }
            set { this.artist = value; }
        }

        public album Album
        {
            get { return this.album; }
            set { this.album = value; }
        }

        public track Track
        {
            get { return this.track; }
            set { this.track = value; }
        }

    }

    class artist : IEquatable<artist>
	{
		private string name;

        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }

        public bool Equals(artist other)
        {
            if (other.Name.Equals(name))
                return true;
            return false;
        }
	}

    class album : IEquatable<album>
    {
        private string name;
        private string path;

        public bool Equals(album other)
        {
            if (other.Name.Equals(name) && other.Path.Equals(path))
                return true;
            return false;
        }

        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }

        public string Path
        {
            get { return this.path; }
            set { this.path = value; }
        }
    }

    class track : IEquatable<track>
    {
        public enum trackStyle
        {
            CLASSIQUE,
            ROCK,
            RNB,
            BAROQUE,
            METAL,
            POP,
            PUNK,
            ELECTRO,
            FRANCAISE,
            OPERA,
            DANCEFLOOR,
            JAZZ,
            BLUES,
            REGGAE,
            SKA,
            SOUL,
            FUNK,
            DISCO
        }

        private string          name;
        private string          path;
        private TimeSpan        duration;
        private trackStyle      kind;
        private int             id;
        private List<string>    otherArtist;

        public bool Equals(track other)
        {
            if (other.Name.Equals(name) &&
                other.Path.Equals(path))
                return true;
            return false;
        }

        public track()
        {
            otherArtist = null;
        }

         public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }

         public string Path
        {
            get { return this.path; }
            set { this.path = value; }
        }

        public TimeSpan Duration
        {
            get { return this.duration; }
            set { this.duration = value; }
        }

        public trackStyle Kind
        {
            get { return this.kind; }
            set { this.kind = value; }
        }

        public int Id
        {
            get { return this.id; }
            set { this.id = value; }
        }

        public List<string> OtherArtist
        {
            get { return this.otherArtist; }
        }

        public void AddOtherArtist(string value)
        {
            this.otherArtist.Add(value);
        }

        public void DelOtherArtistAt(int value)
        {
            this.otherArtist.RemoveAt(value);
        }

        public void DelOtherArtist(string value)
        {
            this.otherArtist.Remove(value);
        }
    }
}
